package com.situ.stmall.service;

import java.util.List;

import com.situ.stmall.entity.Order;

public interface OrderService {

	/**
	 * 添加订单, 返回订单的主键
	 * @param userId
	 * @param cartIds
	 * @param addressId 
	 * @return
	 */
	Order add(Integer userId, Integer[] cartIds, Integer addressId) throws Exception;

	Order getById(String orderId);

	int update(Order order);

	int pay(String id, String paypwd, Integer id2) throws Exception;

	List getByUserId(Integer id);
	
	/**
	 * 清理无效订单
	 */
	int clean();

	/**
	 * 清除指定订单
	 * @param orderId
	 * @return
	 */
	int removeById(String orderId);
}
